<!--
  Generated template for the HomePage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar no-border>
    <button ion-button menuToggle>
      <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>野保宝</ion-title>
  </ion-navbar>

  <ion-slides pager="true">
    <ion-slide *ngFor="let news of newsList">
      <img style="width:100%;height:170px;" src="{{news.imageUrl}}" (click)="gotoNewsDetail(news)">
    </ion-slide>
  </ion-slides>
</ion-header>

<ion-content #myContent no-padding no-margin>

  <ion-refresher (ionRefresh)="doRefresh($event)">
    <ion-refresher-content pullingText="下拉刷新"></ion-refresher-content>
  </ion-refresher>
  <ion-list no-lines>
    <plant-item *ngFor="let item of plants" (click)="recordClicked(item)" [item]=item></plant-item>
    <ion-allitem-showed-bottom *ngIf="plants.length>=total&&plants.length>0"></ion-allitem-showed-bottom>
    <ion-custom-empty *ngIf="total==0"></ion-custom-empty>
  </ion-list>
  <ion-infinite-scroll *ngIf="plants.length<total" (ionInfinite)="doInfinite($event)">
    <ion-infinite-scroll-content loadingText="正在加载..."></ion-infinite-scroll-content>
  </ion-infinite-scroll>

</ion-content>